Passed
Push — master ( 57e849...66e16b )
by Michael
02:16
created

PluginInlineView.js ➔ ???   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
nc 2
dl 0
loc 1
c 0
b 0
f 0
cc 2
nop 1
rs 10
1
import AbstractNodeView from './AbstractNodeView';
2
3
class PluginInlineView extends AbstractNodeView {
4
    /**
5
     * @param {object} attrs the attributes that will be added to the dom node
6
     *
7
     * @return {void}
8
     */
9
    renderNode(attrs) {
10
        if (!this.dom) {
11
            this.dom = document.createElement('code');
12
            this.contentDOM = document.createElement('span');
13
            this.dom.appendChild(this.contentDOM);
14
        }
15
        Object.entries(attrs).forEach(([key, value]) => this.dom.setAttribute(key, value));
16
    }
17
}
18
19
export default PluginInlineView;
20